import React, { Component } from 'react';
import style from './index.module.scss'
import { withRouter } from 'react-router-dom'
import { NavBar } from 'antd-mobile'

class Index extends Component {

    back = () => {
        this.props.history.goBack()
        console.log(this.props);
    }
    render() {
        return (
            <div className={style.navbar}>
                <NavBar onBack={this.back} > {this.props.title} </NavBar>

            </div>
        );
    }
}

export default withRouter(Index);